Skip to content

Add taskbar placement controls and adaptive provider usage rows - #69

Open
Kuu44 wants to merge 2 commits into
CodeZeno:mainfrom
Kuu44:codex/taskbar-placement-and-usage-fixes
Open

Add taskbar placement controls and adaptive provider usage rows#69
Kuu44 wants to merge 2 commits into
CodeZeno:mainfrom
Kuu44:codex/taskbar-placement-and-usage-fixes

Conversation

@Kuu44

@Kuu44 Kuu44 commented Jul 28, 2026

Copy link
Copy Markdown

Summary

This PR improves taskbar placement controls and makes provider usage indicators accurately reflect whichever quota windows are currently available.

What changed

Taskbar placement

  • Added Settings → Taskbar Side with persistent Left and Right anchoring.
  • Preserved Right as the default for existing installations.
  • Updated drag calculations so movement follows the cursor correctly from either anchor.
  • Supported both embedded taskbar placement and fallback popup mode.
  • Added Settings → Monitor on multi-monitor systems.
  • Reused the existing taskbar-switching path and persisted the selected monitor.
  • Matched monitor labels to Windows display numbers where available.
  • Kept the Monitor submenu hidden when Windows exposes only one taskbar.

Codex usage windows

  • Stopped assuming Codex’s primary window is always 5 hours and its secondary window is always weekly.
  • Classified returned windows using their reported duration.
  • Fixed weekly-only Codex usage appearing in the top 5h position.
  • Hidden unavailable Codex bars instead of showing a misleading 0%.
  • Preserved provider-column alignment when an individual window is unavailable.
  • Added a regression test for a weekly-only Codex response.

Antigravity authentication

  • Corrected the recovery guidance to tell users to run agy and sign in from a terminal.
  • Updated the README and all supported localized authentication messages.
  • This reflects the credential source used by the monitor; signing into the IDE alone may not refresh it.

Documentation and localization

  • Documented taskbar-side and monitor selection.
  • Documented the persisted taskbar-side setting.
  • Added Taskbar Side, Left, Right, and Monitor labels across all 11 supported languages.

Issues fixed

  • The widget could only anchor near the notification area, causing it to overlap centered taskbar application icons on some Windows setups.
  • Moving the widget between screens required dragging it onto another taskbar with no direct monitor selector.
  • Weekly-only Codex quota data could be presented as a 5-hour limit while the weekly row showed 0%.
  • Antigravity recovery instructions incorrectly suggested that signing back into the IDE was sufficient.

Verification

  • cargo fmt -- --check
  • Windows GNU test target compiled successfully.
  • All 6 unit tests passed, including the weekly-only Codex regression test.
  • Optimized Windows release build completed successfully.
  • Git diff checks passed.

Compatibility notes

  • Existing users continue to default to right-side anchoring.
  • Monitor selection appears only when Windows exposes taskbars on multiple displays.
  • No settings migration or breaking change is required.

Kuu44 added 2 commits July 28, 2026 18:03
Add persistent left/right taskbar anchoring and direct monitor selection, including localized menu labels and drag behavior for embedded and fallback modes.

Classify Codex rate-limit windows by duration so weekly-only quotas render on the weekly row, hide unavailable Codex bars, and point Antigravity reauthentication to the agy CLI.
Copilot AI review requested due to automatic review settings July 28, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Windows taskbar widget’s placement UX by adding persistent left/right anchoring and an explicit monitor selector, and improves Codex quota-window mapping so the UI reflects whichever windows the API actually returns. It also updates Antigravity re-auth guidance and localizes the new UI labels across all supported languages.

Changes:

  • Added Settings → Taskbar Side (Left/Right) with persisted taskbar_side and updated positioning/drag math for both embedded and fallback popup modes.
  • Added Settings → Monitor (only when multiple taskbars are detected) to switch taskbar hosting via existing attachment logic, with display-number labeling when available.
  • Improved Codex window classification based on reported duration, hid unavailable Codex rows, added a regression test, and updated Antigravity auth recovery guidance + docs/localizations.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
working.md Adds an internal handoff/scratchpad document (should likely not ship in-repo).
src/window.rs Implements taskbar-side anchoring, monitor submenu wiring, and hides unavailable Codex rows during rendering.
src/poller.rs Classifies Codex windows by duration fields and adds a regression test for weekly-only responses.
src/native_interop.rs Adds monitor display-number inference via MonitorFromPoint + GetMonitorInfoW.
src/localization/mod.rs Extends Strings with taskbar-side and monitor labels.
src/localization/english.rs Adds new strings + updates Antigravity recovery message.
src/localization/dutch.rs Adds new strings + updates Antigravity recovery message.
src/localization/spanish.rs Adds new strings + updates Antigravity recovery message.
src/localization/french.rs Adds new strings + updates Antigravity recovery message.
src/localization/german.rs Adds new strings + updates Antigravity recovery message.
src/localization/japanese.rs Adds new strings + updates Antigravity recovery message.
src/localization/korean.rs Adds new strings + updates Antigravity recovery message.
src/localization/traditional_chinese.rs Adds new strings + updates Antigravity recovery message.
src/localization/simplified_chinese.rs Adds new strings + updates Antigravity recovery message.
src/localization/russian.rs Adds new strings + updates Antigravity recovery message.
src/localization/portuguese_brazil.rs Adds new strings + updates Antigravity recovery message.
README.md Documents monitor selection and taskbar-side anchoring; updates Antigravity sign-in guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread working.md
Comment on lines +1 to +8
# Working State — Taskbar Side + Monitor Selection

**Session date:** 2026-07-28
**Repo:** `F:\Projects\Coding Projects\Claude-Code-Usage-Monitor`
**Branch:** `main` — HEAD is `7b108da v1.4.9`
**Status:** Two features implemented, compile-verified, **not committed**. A test exe was built for the user, who is currently testing it.

This file is a handoff for another agent. It describes what was asked, what was changed, how it was verified, the environment landmines on this machine, and what is left to do.
Comment thread src/window.rs
Comment on lines 683 to +695
if let Some(codex) = data.codex.as_ref() {
state.codex_session_text = poller::format_line(&codex.session, strings);
state.codex_weekly_text = poller::format_line(&codex.weekly, strings);
state.codex_session_text =
if codex.session.resets_at.is_none() && codex.session.percentage == 0.0 {
String::new()
} else {
poller::format_line(&codex.session, strings)
};
state.codex_weekly_text =
if codex.weekly.resets_at.is_none() && codex.weekly.percentage == 0.0 {
String::new()
} else {
poller::format_line(&codex.weekly, strings)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants